package com.hingstd.lastwork.services;

import com.hingstd.lastwork.dao.WarnRepository;
import com.hingstd.lastwork.entities.Warn;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WarnService {

    @Autowired
    WarnRepository warnRepository;

    public Warn save(Warn warn) {

        return warnRepository.save(warn);
    }

    public List<Warn> getAll() {
        return warnRepository.findAll();
    }

}
